home *** CD-ROM | disk | FTP | other *** search
/ The CICA Windows Explosion! / The CICA Windows Explosion! - Disc 2.iso / programr / dpmigcc5.zip / RSX / DOC / INSTALL.TXT < prev    next >
Text File  |  1994-12-12  |  16KB  |  564 lines

  1. --------------------------------------------------------------------------------
  2. INSTALL.TXT        DPMI-RSX  (c) Rainer Schnitker             12/1994
  3. --------------------------------------------------------------------------------
  4.  
  5. This file contains information about:
  6.  
  7.     * Hardware Requirements
  8.     * Software Requirements
  9.     * Create more DPMI memory
  10.     * Install for EMX
  11.     * Install for DJGPP
  12.     * RSX, the DPMI extender
  13.     * Command line switches like EMX (changed!)
  14.     * Command line switches for RSX (changed!)
  15.     * enable gcc -pipe
  16.     * emtex TeX386 / stack faults
  17.     * Major bugs in tested DPMI-hosts
  18.     * Patch for next EMX-Update
  19.     * Error messages from RSX
  20.  
  21.  
  22.  
  23.     This program is distributed in the hope that it will be useful,
  24.     but WITHOUT ANY WARRANTY; without even the implied warranty of
  25.     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  26.     GNU General Public License for more details.
  27.  
  28.  
  29.  
  30. --------------------------------------------------------------------------------
  31.  
  32.  
  33.  
  34. Hardware Requirements:
  35. ----------------------
  36.  
  37. - RSX requires a 386SX-CPU (or higher)
  38.  
  39.   (A 387 coprocessor is not necessary, because RSX emulates it)
  40.  
  41.  
  42.  
  43.  
  44. Software Requirements:
  45. ----------------------
  46.  
  47. - A DPMI 0.9/1.0 - Server like:
  48.  
  49.     MS-Windows 3.1 enhanced mode
  50.  
  51.     QEMM386 + QDPMI
  52.  
  53.     386MAX 6.x, 7.x
  54.  
  55.     OS/2 2.x, 3.0 (Warp)
  56.  
  57.     MS-Windows NT
  58.  
  59.  
  60.   To use the 387-emulator the DPMI-server must provide DPMI 1.0 floating-point
  61.   extensions (most 0.9 server support this).
  62.  
  63.   ** Otherwise (on crashes), you should use the -Re0 option **
  64.  
  65.  
  66. - DOS 3.3+ or DOS box emulation
  67.  
  68. - A GNU-C port for DOS (EMX 0.8 or DJGPP 1.xx)
  69.  
  70.   or any EMX program that should run under DPMI (like TeX386 beta11).
  71.  
  72.  
  73.  
  74.  
  75. Create more DPMI memory:
  76. ------------------------
  77.  
  78. If your GCC program (TeX386, gcc.exe) runs out of memory,
  79. you should read this section.
  80.  
  81. (Now there is also a RSX option '-Rm' to prealloc memory)
  82.  
  83.  
  84. MS-Windows 3.1:
  85.     If you have enough memory or a permanent swapfile and you run Windows
  86.     a long time, try to restart Windows. Perhaps other programs destroy
  87.     memory blocks.
  88.  
  89.     1) Increase or install a *permanent* Swapfile (Control Panel / 386).
  90.  
  91.     Without a permanent Swapfile, you can't run TeX386 from emTeX, if you
  92.     have only 4 MB physical memory. (TeX message "DYN: out of memory").
  93.     Also Windows uses more virtuel memory with '32bit access'.
  94.  
  95.     If you can't increase the swapfile, you can set the value PageOverCommit
  96.     in the system.ini [386Enh] section, insert
  97.     PageOverCommit=8
  98.     the default value is 4. Restart Windows.
  99.     After that, you should increase the permanent Swapfile again.
  100.  
  101.       [ PageOverCommit=value:
  102.       Specifies the multiplier for determining the amount of linear address
  103.       space. The amount of linear address space is computed by rounding up the
  104.       amount of available physical memory to the nearest 4 megabytes and then
  105.       by multiplying that value to the value specified for this setting. ]
  106.  
  107.     2) Also you can create a smaller DOS-Box. PIF-settings:
  108.     - 350 KB DOS memory maximum
  109.     - EMS=0 ; XMS=0 ; no High-Memory-Area
  110.  
  111.  
  112. 386MAX 7.0:
  113.     To increase memory you must have a SWAPFILE line in your 386MAX.PRO file
  114.     SWAPFILE=C:\386MAX\386MAX.swp /S=8192
  115.     This creates a 8 MB swapfile. The size of the virtual swapfile is the
  116.     amount of virtual memory available to your applications.
  117.  
  118. QEMM + QDPMI:
  119.     Set the environment QDPMI to something like
  120.     QDPMI=SWAPFILE c:\tmp\qdpmi.swp 8192
  121.     This creates a 8 MB swapfile. The sum of the value of availble memory and
  122.     the size of the virtual swapfile is the amount of virtual memory available
  123.     to your applications.
  124.  
  125. OS/2:
  126.     DOS settings:
  127.     DPMI_DOS_API    AUTO        (default: auto)
  128.     DPMI_MEMORY_LIMIT    8-16 MB     (default: only 4 MB (Warp V3))
  129.     EMS,XMS        is not needed
  130.     DOS FILES        40-100        (default: only 20)
  131.  
  132.     You should increase DPMI_MEMORY_LIMIT.
  133.  
  134.  
  135.  
  136. INSTALL for EMX programs:
  137. -------------------------
  138.  
  139.     Set the environment varaible RSX to:
  140.     RSX = C:\RSX\BIN\RSX.EXE.
  141.  
  142.     If the EMX program stub detects only DPMI (Windows and OS/2 DOS box),
  143.     it must find rsx.exe in the PATH statement or the environment variable RSX.
  144.  
  145.     If the emx stub finds a VCPI server (himem.sys + emm386, qemm386, max)
  146.     it tries to run emx.exe. You should set the EMX environment.
  147.     EMX = C:\EMX\BIN\EMX.EXE
  148.  
  149.     This works with the emx stub (emxl.exe) from EMX version 0.8h or higher.
  150.  
  151.     If there is no coprocessor, rsx emulates all coprocessor instructions
  152.     by default. You can overide this with the '-Re' option.
  153.  
  154.     That's it!
  155.  
  156.  
  157. Notes:
  158.     (a)
  159.     If you always want to run rsx.exe instead of emx.exe, you should set
  160.     EMX to RSX:
  161.         RSX = C:\RSX\BIN\RSX.EXE.
  162.         EMX = C:\RSX\BIN\RSX.EXE.
  163.  
  164.     If you have no coprocessor and you want run the gcc compiler
  165.     this method is recommend. Also you can use the stub
  166.     \rsx\bin\emxldpmi.exe.    This stub runs always RSX, if there
  167.     is a DPMI-server.
  168.  
  169.     (b)
  170.     Note that the default stack is 256 KB. If you need more space, use
  171.     the -s option to grow the stack, or set a environment-var RSXOPT.
  172.     Example: RSXOPT=-Rs512 sets the stack to 512 Kbytes.
  173.     (see * Command line switches for RSX)
  174.  
  175.  
  176.  
  177. INSTALL for DJGPP:
  178. ------------------
  179.  
  180. 1)  Bound executable must find RSX.EXE in the PATH or current directory.
  181.     Copy the binary files from \rsx\bin to your \djgpp\bin directory.
  182.     Or change the PATH to \rsx\bin.
  183.  
  184. 3)  Creating bound executable:
  185.     a) For go32 version 1.11 you can use the tools coff2exe, stubedit.
  186.     To create a gcc compiler for RSX.EXE do this:
  187.     C:\GCC\BIN> xcopy gcc.exe gccdpmi.exe
  188.     C:\GCC\BIN> stubedit gccdpmi.exe extender=rsx
  189.  
  190.     b) for older versions:
  191.     You must use the new stub STUBDJ.EXE to create bound executable. The
  192.     program BINDDJ puts a stub and the a.out program together:
  193.  
  194.     > BINDDJ stubdj.exe myfile myfile.exe
  195.  
  196.     Stubdj executes RSX if a DPMI-server is there, and go32.exe if there is no
  197.     DPMI-server. To change the gcc compiler exe-stub, use EXE2AOUT from djgpp
  198.     to get the a.out file and use the BINDDJ command to create the new stub.
  199.  
  200.     Example:
  201.     C:\GCC\BIN> exe2aout gcc.exe
  202.     C:\GCC\BIN> binddj stubdj.exe gcc gccd.exe (copy stubdj+gcc gccd.exe)
  203.  
  204.  
  205. [4] LIBRSX.A
  206.     If you want to use signals(), ptrace(), wait(), etc. you must copy
  207.     the library 'librsx.a' from \rsx\source\djlibrsx to your \djgpp\lib.
  208.  
  209.     Read the file 'readme' in the \rsx\source\djlibrsx to build and install
  210.     this futures.
  211.  
  212.  
  213.  
  214. RSX the DPMI extender:
  215. ----------------------
  216.  
  217. RSX is compiled with EMX+GCC and doesn't use the EMX C-Library.
  218. Also RSX is linked with the FPU-EMU.
  219.  
  220. In the previous version rsx.exe was a 16bit program and rsx32.exe
  221. the 32bit program. The names are changed.
  222. The 16bit executable was deleted.
  223.  
  224.  
  225.  
  226. Command line switches for RSX:
  227. ------------------------------
  228.  
  229. Syntax:
  230.     RSX [options] a.out-file
  231.  
  232. You can put command-line switches in the RSXOPT environment variable.
  233.  
  234.     Example:  SET RSXOPT=-c -h60
  235.         This disables writing a core file
  236.         and sets DOS handles
  237.  
  238. Also RSX reads options from emxbind (rsxopt).
  239.  
  240.     Example:
  241.         emxbind -a gcc.exe -Rx
  242.         rsxopt -a gcc.exe -Rx
  243.     This enable RSX pipe/schedule futures (for 'gcc -pipe')
  244.  
  245.  
  246. Most switches are EMX compatible. Special RSX switches can be used
  247. with '-R'. The emxbind version (EMX 0.9) will support '-R'.
  248.  
  249. There is also a new program called 'rsxopt', which writes options
  250. in the bound emx-exe file.
  251.  
  252.  
  253.  
  254. Command line switches like EMX:
  255. -------------------------------
  256.  
  257. This options can be used with emxbind (rsxopt).
  258.  
  259.  
  260. -a[cmwi] enable some DOS features (like EMX):
  261.      -ac makes data and the stack executable (default now, RSX 4)
  262.      -am enable _memaccess() (for writing 0xA0000h-0xFFFFFh)
  263.      This option destroy protection under RSX with DPMI 0.9
  264.      (see source sysemx.c/loadprg.c)
  265.      Under DPMI 1.0 the first DOS megabyte is mapped after
  266.      the stack space.
  267.      -aw enables write access to all areas
  268.      DPMI 0.9 don't allow write protection
  269.      -ai enables _portaccess() for EMX,
  270.      RSX ignore this (DPMI-Server allow/emulate this)
  271.  
  272.  
  273. -c   disable core dumps
  274.  
  275.  
  276. -h#  set DOS file handle limit to #.
  277.  
  278.  
  279. -p   for EMX: don't use all low DOS memory (ignored for rsx).
  280.  
  281.  
  282.  
  283. others (not emxbind):
  284.  
  285. -e   !!Changed!! Disabling the FPU emulator needs -Re.
  286.  
  287. -V   Display RSX version
  288.  
  289.  
  290.  
  291.  
  292. Command line switches for RSX:
  293. ------------------------------
  294.  
  295.  
  296. All RSX options must begin with -R.
  297.  
  298. Syntax:
  299.     a)  -Ropt1opt2opt3          (short form)
  300.     b)  -R,opt1,opt2,opt3          (',' are ignored)
  301.     c)  -Ropt1 -Ropt2 -Ropt3      (repeat -R)
  302.  
  303.     method (c) cannot used with emxbind, use rsxopt instead
  304.  
  305.  
  306. Examples:
  307.     RSX -Re0x
  308.     RSX -R,e0,m1024,x
  309.     RSX -R9 -Rx -Rs
  310.  
  311.  
  312. RSX options:
  313.  
  314. a   Don't use expand-down stacksegment, ss = data segment.
  315.  
  316.     RSX uses expand-down stack-segments to control the stack. But some
  317.     gcc-programs uses the EBP register for a pointer in the data-segment.
  318.     This causes a stack-fault. Don't use gcc -fomit-frame-pointer.
  319.  
  320.     RSX default program layout:
  321.  
  322.     |-------|---code---|---data/bss---|----<<stack-------|--heap--
  323.      <no access esp,ebp>          ^lower limit expand-down
  324.  
  325.  
  326.     TeX386 must use the -Ra option.
  327.     Example:
  328.     emxbind -a tex386.exe -Ra
  329.     rsxopt    -a tex386.exe -Ra
  330.  
  331.  
  332. e    Don't use 387 emulation / don't change FPU status with coprocessor.
  333.  
  334.      Under RSX this disables loading 387 emulation if you have no coprocessor.
  335.      On floating point instructions, the program will terminated with signal
  336.      SIGFPE (this is like -e2).
  337.  
  338.      With a coprocessor the status is not saved between processes.
  339.      There are no DPMI calls for the 387 (for buggy dpmi host).
  340.  
  341.  
  342. e[0-3]
  343.  
  344.      force the fpu-status:
  345.  
  346.      Bit     Significance
  347.      0         new value of MPv bit for client's virtual CR0
  348.          0 = disable numeric coprocessor for this client
  349.          1 = enable numeric coprocessor for this client
  350.      1         new value of EMv bit for client's virtual CR0
  351.          0 = client will not supply coprocessor emulation
  352.          1 = client will supply coprocessor emulation
  353.  
  354.      This means for RSX:
  355.  
  356.      e1: enable FPU, don'emulate                    [if you have a 387,487,..]
  357.      e2: disable FPU, but catch FPU instructions    [set if no 387 is present]
  358.      e3: enable FPU, emulate FPU instructions        [emulate all FPU instr]
  359.  
  360.      e0: RSX does nothing, the default DPMI-host FPU status is used.
  361.  
  362.     If your DPMI-host crash after terminating the emx-program, try -Re0
  363.     (Novell DOS 7.0 EMM386, reported from QEMM 7.x)
  364.  
  365.     This option should also used, if the host does not support
  366.     to set the FPU status.
  367.  
  368.  
  369. s#   set stack size in KB
  370.  
  371.      default:  256 KB under DPMI 0.9
  372.  
  373.      Under DPMI 1.0 the stack grows from 60 MB to the heap
  374.      The stack size is ignored.
  375.  
  376.  
  377.  
  378. m#
  379.     Prealloc memory for heap. This option is useful for:
  380.  
  381.     - reduce realloc heap calls to DPMI host
  382.  
  383.     - if DPMI realloc is buggy
  384.       perhaps for problems with emtex386 in the Windows DOS box
  385.  
  386.     - memaccess()
  387.       Growing the heap can change the base address of the program (OS/2).
  388.       Then the memaccess() pointer is *not* valid.
  389.       Prealloc enough memory.
  390.       There is a default prealloc value (128 KB), if you use
  391.       use the 'enable memaccess' option.
  392.  
  393.     Example:  -Rm1024 (prealloc 1 MB heap)
  394.  
  395.  
  396. x   enable scheduler, needed for 'gcc -pipe'
  397.  
  398. O   set OS/2 bit; needed for pipe with emx0.8x
  399.  
  400.  
  401. z   Zero the heap. Memory from malloc() in not filled with zeros by default.
  402.  
  403. 9   Force DPMI 0.9 services
  404.     If you have problems with your DPMI 1.0 server, use this option
  405.  
  406. 1   Use also DPMI 1.0 services
  407.     Only 386MAX 7 support this option
  408.  
  409.  
  410. Debug/testing options:
  411.  
  412. F   print all output in a file called RSX.LOG
  413.     Also useful for graphic programs.
  414.  
  415. I   print all int 0x21 calls
  416.  
  417. P   print some extra information
  418.     print registers after exception
  419.  
  420. K   kernel debug mode (see also KRNLDEB.TXT)
  421.     It is possible to debug RSX (32bit) with GDB
  422.  
  423.  
  424.  
  425. Enable gcc -pipe:
  426. -----------------
  427.  
  428. You can use emxbind (emx 0.9) or rsxopt:
  429.  
  430.     Example:
  431.         emxbind -a gcc.exe -Rx
  432.         rsxopt -a gcc.exe -Rx
  433.     This enable RSX pipe/schedule futures (for 'gcc -pipe')
  434.  
  435. This option (-Rx) is beta. Please report bugs to the author.
  436.  
  437. Also you can set:
  438.     RSXOPT=-Rx
  439.  
  440. It's better to bind the option into the exefile. The RSXOPT environment
  441. variable will be used for all programs and perhaps one program does not
  442. run with '-Rx'.
  443.  
  444. If you run the 0.8x emx package you must also set set OS/2 flag for gcc
  445.     '-RO' : set OS/2 environment flag
  446.  
  447.  
  448.  
  449. emtex TeX386 / stack faults:
  450. ----------------------------
  451.  
  452. RSX controls the stack with a expand-down stack segment.
  453. TeX386 versions were compiled with the gcc option '-fomit-frame-pointer'.
  454. This option can cause a stack fault, if gcc uses the frame pointer for
  455. a normal pointer.
  456.  
  457. There are two options for RSX:
  458.     * -Ra    (set ss=ds, no expand-down)
  459.     * -Rs#   (set stack size. If stack_size <= 60, the fault does not happen)
  460.  
  461. You can use rsxopt to put the first option in the tex386 file (emxrt 0.9).
  462.     Example:
  463.         rsxopt -a \emtex\tex386.exe -Ra
  464.  
  465.  
  466.  
  467.  
  468. Major bugs in tested hosts :
  469. ----------------------------
  470.  
  471.     MS-Windows 3.1
  472.     - problems with TeX386 memory calls (-Rm option)
  473.     - debug handler different (but RSX can handle this)
  474.  
  475.     386MAX 7.00 (DPMI1.0 server: support demand paging with rsx)
  476.     - ResizeLinearMemory bug (RSX don't use this)
  477.  
  478.     386MAX 6.00
  479.     - RSX Control-C handler will never called
  480.     - (no virtuel memory)
  481.  
  482.     QEMM + QDPMI 1.01  [ QEMM 7.xx not tested ]
  483.     - page faults terminates program
  484.     - QDPMI virtuel memory error after memory resize fails (page fault)
  485.       (happened in GDB.EXE)
  486.  
  487.     Novell DOS 7.0 EMM386
  488.     - crash on DPMI 1.0 calls -> 387 emulation is not possible
  489.       you *must* use the '-e0' option
  490.  
  491.     OS/2 2.x / Warp V3
  492.     - DPMI int 0x31 doesn't switch stacks (bad for RSX version <= 3)
  493.     - problems with memaccess()        (use option -Rm)
  494.     - system crash for some dpmi 1.0 calls
  495.  
  496.     NT (not tested, TeX386b11 should run)
  497.     - you must use the '-e0' or '-e' option
  498.  
  499.  
  500.  
  501. Patch for next EMX-Update:
  502. --------------------------
  503.  
  504. If you upgrade a new EMX version (maybe emx0.9b ?), you always get a warning
  505. message, if you run the rsx.exe file.
  506.  
  507. Now you can patch the RSX.EXE file:
  508.  
  509.     Take a good hexdump-editor
  510.     Load RSX.EXE
  511.     Search for reversed version number "a9.0"
  512.     Change this value
  513.     Save RSX.EXE
  514.  
  515.  
  516.  
  517. Error messages from RSX:
  518. ------------------------
  519.  
  520. "No DPMI-host found!"
  521.     There is no DPMI-server. Use EMX instead.
  522.  
  523. "32bit programs not supported"
  524.     The DPMI-server supports only 16-bit programs. You can't use RSX.
  525.  
  526. "Can't alloc memory for the DPMI-host-stack"
  527.     The DPMI-server needs some DOS memory for RSX.
  528.     Do you have enough DOS memory?
  529.  
  530. "can't switch to Protected Mode"
  531.     DPMI-server can't switch RSX in Protected Mode.
  532.     Do you have enough extended memory?
  533.  
  534. "No DPMI-server 387 support", "use -e option"
  535.     DPMI-server doesn't support a coprocessor. Use 'RSX -e0 prog' or set
  536.     the environment 'RSXOPT=-e0'.
  537.  
  538. "error:can't get int21", "error:can't set int21"
  539.     RSX can't change the interrupt vector 0x21.
  540.  
  541. "error: not a valid PSP option -/xxxx/\n"
  542.     EMXBIND error in bound executable.
  543.  
  544. "Can't find RSX387"
  545.     Set the environment RSX387 like RSX387=c:\rsx\fpu-emu\rsx387
  546.  
  547. "Can't load emu: "
  548.     Not enough memory for 387 emulator. Try -p option or increase DOS
  549.     memory.
  550.  
  551. "rsx_32 loader error:"
  552.     The rsx stub can't load the 32bit extender (RSX.EXE).
  553.     Possible errors:
  554.     "No DPMI-host found!"
  555.     "Can't alloc memory for the DPMI-host-stack"
  556.     "can't switch to Protected Mode"
  557.     "realloc memory error"
  558.  
  559. for emTeX386 users: "DYN: out of memory"
  560.     is a TeX message, increase your DPMI memory (section 3).
  561.     Since TeX386 uses a big heap (3-4 MB), a permanent swapfile in Windows
  562.     is recommend with only 4MB installed.
  563.  
  564.